#include <stdio.h>
#include <stdlib.h>
#include <string.h>

struct person {
	char name[30];
	char sex[1];
	int score;
};
void input(struct person *s1){
	int ret=0;
RETRY:
	printf("请输入用户姓名,性别，分数：");
	ret=scanf("%s %c %d",s1->name,s1->sex,&s1->score);
	if (ret!=3){
		printf("输入错误，请检查\n");
		while (getchar()!='\n');
		goto RETRY;
	}
	if ('s1->sex' != 'm' || 's1->sex' != 'w'){
		printf("输入性别有误，请检查\n");
		goto RETRY;
	}
	if (s1->score<0 || s1->score>100){
		printf("成绩输入有误，请检查\n");
		goto RETRY;
	}
}
void output(struct person s1){
	printf("name:%s,sex:%s,score:%d\n",s1.name,s1.sex,s1.score);
}
int main(int argc, const char *argv[])
{
	struct person s1;
	input (&s1);
	output (s1);
	return 0;
}

